/**
 * File              : main.rs
 * Author            : leoatchina <leoatchina@outlook.com>
 * Date              : 2020.11.21
 * Last Modified Date: 2020.11.21
 * Last Modified By  : leoatchina <leoatchina@outlook.com>
 */

fn takes_ownership(some_string: String) -> String{
    println!("{}", some_string);
    some_string
}

fn makes_copy(i: i32) -> i32 {
    println!("i = {}", i);
    i
}

fn main() {
    let s = String::from("hello");
    let s1 = takes_ownership(s);
    println!("{}", s1);
    // println!("{}", s);

    let x = 5;
    let y = makes_copy(x);
    println!("{}", y);
    println!("Hello, world!");
}

